---
title: "Replication guide for: Rental Market Risk and Radical Right Support"
authors:
  - Tarik Abou-Chadi
  - Denis Cohen
  - Thomas Kurer
format: html
---

## Data availability statement

Our analyses combine restricted-access geocoded data from the German Socio-Economic Panel (GSOEP), a high-quality annual household panel survey that has been in operation by the German Institute for Economic Research (DIW) since 1984, with proprietary data on postcode-level rental market statistics purchased from the German market research company F+B (now FUB IGES Wohnen+Immobilien+Umwelt GmbH).

To replicate our analyses, users must:

1. purchase the rental market data from F+B and
1. apply for an on-site visit at the GSEOP Research Data Center in Berlin (SOEP-FDZ).

### F+B rental market data

These proprietary rental market statistics cannot be shared with third parties. Therefore, users must obtain their own copies of the licensed data sets:

1. *F+B Market Monitor:* Hedonic residential market rent at zip code level for all of Germany's approx. 8,200 delivery zip codes 
2. *F+B Market Rent Monitor:* Residential market rent statistics at zip code level for all of Germany's approx. 8,200 delivery zip codes

Additional information, such as the lists of variables for each data set, can be requested from the authors.

The data provider can be contacted at: 

>FUB IGES Wohnen+Immobilien+Umwelt GmbH
>
>Adenauerallee 28
>
>20097 Hamburg, Germany
>
>https://fub.iges.com/


### GSOEP data with geocodings

The GSOEP data used in our manuscript has been augmented with small-area regional identifiers. Therefore, strict data protection laws apply. Most notably, the data is exclusively available for on-site use at the DIW Research Data Center in Berlin, Germany.

General information on using regional data in the GSOEP can be found here: [https://www.diw.de/en/diw_01.c.683748.en/regional_data.html#c_683759](https://www.diw.de/en/diw_01.c.683748.en/regional_data.html#c_683759).

Specific data protection measures for the use of geocoded GSOEP data can be found here: [https://www.diw.de/documents/dokumentenarchiv/17/diw_01.c.44070.de/geocode_richtlinie.415762.pdf](https://www.diw.de/documents/dokumentenarchiv/17/diw_01.c.44070.de/geocode_richtlinie.415762.pdf)


For further information, please contact: 

>SOEP Community Management
>
>Philipp Kaminsky and Antonia Meier
>
>User support and contract management for the Research Data Center of the SOEP in the German Socio-Economic Panel Study Department
>
>soepmail@diw.de
 

## Project initialization

Data management, analysis, and visualization was partly performed at the SOEP-FDZ (whenever access to the georeferenced data was required) and partly on a personal computer (for post-processing and visualizing exported estimates from the SOEP-FDZ).

The data project was initialized with identical directory hierarchies on both machines. As a result, users can replicate all our analyses at once by importing this replication package, along with the required external access-restricted data sets, at the SOEP-FDZ.

```
├── 202410_rents_replication.Rproj
│../../soep-data/soep.v35/stata_de+en
├── dat
│   ├── auxiliary
│   ├── de_f_und_b
│   ├── plz-gebiete.shp
│   └── proc-data
├── est
├── fig
├── fun
├── logs
└── scripts
```

The GSOEP data will be available in directory `../../soep-data/soep.v35/stata_de+en`. This assumes that the project folder is two levels down from the user's personal folder, as indicated by `"../../"`. The F+B data comes comprises two XLSX files, `F+B-Marktmietenmonitor_PLZ_2004_2018.xlsx` and `Marktmonitor_20191111.xlsx`, which must be stored in the directory `dat/de_f_und_b`. Any processed data from these two sensitive data sets will be saved to the directory `dat/proc-data`.

Consequently, the following directories are **not** included in the replication materials:

- `../../soep-data/soep.v35/stata_de+en`: SOEP data, including regional data in `regionl.dta` and `microm.dta`
- `dat/de_f_und_b`: Proprietary rental market statistics from F+B
- `dat/proc-data`: Data processed from `[1]` and `[2]` (imputations etc.)

The other directories are included:

- `dat`
  - `dat/auxiliary`: Auxiliary data files
  - `dat/plz-gebiete.shp`: Shape file for German postcodes
- `est`: Pre-processed estimates exported from the FDZ-SOEP
- `fig`: All figures contained in the main text and online appendix
- `fun`: Self-defined R functions
- `logs`: Log files that document the successful execution of all scripts
- `scripts`: Stata and R scripts

## Computation

All scripts are being sourced in `scripts/00-repl-master.R`. Therefore, running this scripts will sequentially run the following scripts:

- `01-01-process-soep-data.do`
- `01-02-process-soep-microm.do`
- `01-03-process-f+b-data.R`
- `02-01-imputation.R`
- `02-02-post-processing.R`
- `03-01-correlates-estimation.R`
- `03-02-correlates-processing.R`
- `03-03-vote-plots.R`
- `03-04-subset-descriptives-estimation.R`
- `03-05-subset-descriptives-processing.R`
- `03-06-market-plots.R`
- `03-07-eurostat-plots.R`
- `03-08-perceptions-plot.R`
- `04-01-main-analyses.R`
- `04-02-main-analyses-processing.R`
- `04-03-main-analyses-tables.R`
- `05-01-aux-analyses-fe.R`
- `05-02-aux-analyses-fe-processing.R`
- `05-03-aux-analyses-infladj.R`
- `05-04-aux-analyses-infladj-processing.R`
- `05-05-aux-analyses-microm.R`
- `05-06-aux-analyses-microm-processing.R`
- `05-07-aux-mediation.R`
- `05-08-aux-sensitivity.R`
- `05-09-aux-mediation-plots.R`

The estimated computation time for all steps is approximately 12 hours.

## Version information

Session information, including operating systems and package versions, are documented in `scripts/00-repl-master.R`. 

